//package com.michaels;
//
//import com.alibaba.fastjson.JSON;
//import com.alibaba.fastjson.TypeReference;
//
//import java.io.*;
//import java.nio.charset.StandardCharsets;
//import java.util.ArrayList;
//import java.util.List;
//import java.util.Map;
//import java.util.stream.Collectors;
//
//public class FGMAPITest {
//    private final static String FGM_JSON = "fgm.json";
//    private static List<String> list = new ArrayList<>();
//
//    private final static String D1 = "896738,2907965,2897140,2200,896862,896962,896961,896863,896864,896965,897105,896866,896927,896869,897222,897417,896967,897035,896867,897583,897418,896868,896928,897221,896966,897036,896836,896865,896873,896874,896975,896974,896973,896972,896872,896871,899287,897421,896968,896971,896969,897225,896870,3169,1674,1217,897447,896581,896584,896583,896562,896563,896564,896566,896565,884,5563,1064,3696,3698,3700,3702,3704,3706,3708,2375,2376,2377,2379,2382,4822685,896697,705813,705857,705855,705856,706569";
//    private final static String D2 = "2159,2160,2551,3658,3659,3660,3661,3662,3663,3664,3665,5278,5279,897339,897539,897540,897941,897952,897953,897954,897955,897956,897957,897958,897960,897961,897962,897963,898056,898058,898092,898093,898094,898197,898198,898199,898276,898284,898285,898384,898385,898480,898500,898502,898503,898504,898506,898507,898577,898603,898604,898605,898606,898610,898682,898719,898720,898721,898780,898784,898785,898881,898882,898893,898894,898995,898997,899103,899104,899105,899106,899107,899108,899149,899152,899153,899154,899155,899186,899187,899188,899189,899191,899192,899193,899194,899202,899211,899248,899251,899260,899261,899262,899263,899290,899309,899310,899319,899320,899321,899322,899324,899325,899326,899368,899381,899382,899393,899394,899395,899396,899397,899398,899399,899400,899401,899402,899403,899404,899405,899426,899441,899471,899472,899473,899474,899478,899484,899520,899521,899571,899572,899573,899574,899575,899605,899606,899607,899608,899609,899610,899611,899612,899613,899614,899615,899616,899617,899618,899619,899676,899677,899678,899679,899680,899681,899682,899749,899750,899751,899752,899785,899786,899787,899788,899789,899790,899791,899792,899793,899794,899795,899796,899797,899798,899813,899818,899819,899820,899821,899822,899823,899825,899826,899827,899865,899866,899890,899896,899897,899898,899899,899900,899901,899920,899921,899931,899932,899934,899935,899967,899968,899981,899986,899987,899989,899990,900012,900020,900021,900022,900023,900024,900026,900040,900042,900043,900044,900162,900163,900164,900165,900166,900167,3073717";
//    private final static String U1 = "2157,2158,1927,1928,1929,1930,3666,3667,897943,897944,897945,897946,897947,897948,897949,897950,897951,897959,897964,897965,897977,897980,897981,897983,897984,897985,897986,897987,897988,897989,897990,897991,897992,897993,897996,897997,897998,897999,898000,898001,898002,898018,898019,898020,898021,898037,898038,898055,898057,898059,898060,898095,898096,898097,898098,898099,898100,898101,898118,898119,898143,898144,898147,898148,898149,898150,898151,898152,898153,898200,898201,898202,898203,898213,898242,898243,898244,898245,898246,898247,898248,898249,898250,898251,898252,898253,898254,898255,898256,898257,898258,898259,898283,898286,898311,898312,898313,898347,898350,898351,898352,898353,898354,898355,898356,898357,898383,898386,898387,898388,898389,898408,898450,898451,898452,898453,898454,898459,898460,898461,898462,898463,898464,898465,898466,898467,898468,898501,898505,898508,898509,898510,898511,898553,898554,898555,898556,898557,898558,898559,898560,898599,898600,898601,898602,898607,898608,898609,898611,898612,898643,898644,898645,898646,898647,898648,898649,898651,898652,898653,898722,898723,898724,898725,898742,898758,898759,898760,898761,898762,898763,898764,898765,898766,898786,898787,898788,898789,898790,898791,898818,898853,898854,898855,898856,898857,898859,898860,898861,898862,898863,898864,898865,898890,898891,898892,898895,898896,898897,898898,898899,898900";
//    private final static String UN1 = "896866,896868,899818,899819,899822,899827";
//    private final static String MAX = "5565,896775,5375497,2383,897718,896582,2384,2385,897220,897419,897330,896977,897415,896585,896652,896779,5543474,897217,897616,897227,897584,897327,897834,897329,897720,897224,896654,897218,897520,897615,4801203,896653,897420,898987,899489,897219,897719,897328,897721,897460,896586,888,896739,897640,3011831,3011857,2386,2387,3190,2907985,896804,896777,896778,896655,1220,896567,897653";
//
//    public static void main(String[] args) throws IOException {
////        System.out.println(get(D1));
////        System.out.println(get(D2));
////        System.out.println(get(U1));
////        System.out.println(get(UN1));
//        System.out.println(get(MAX));
//    }
//
//    private static String get(String str) {
//        String[] split = str.split(",");
//        StringBuilder sb = new StringBuilder("[");
//        for (String s : split) {
//            sb.append("\"");
//            sb.append(s);
//            sb.append("\",");
//        }
//        sb.deleteCharAt(sb.lastIndexOf(","));
//        sb.append("]");
//        return sb.toString();
//    }
////    public static void main(String[] args) throws IOException {
////        String json = readFileByReader(FGM_JSON);
////        Map<String, Object> map = JSON.parseObject(json, new TypeReference<Map<String, Object>>(){});
////        printTaxonomyName((Map<String, Object>) map.get("data"));
////        List<String> collect = list.stream().sorted().collect(Collectors.toList());
////        collect.forEach(e-> System.out.println(e));
////    }
//
//    public static void printTaxonomyName(Map<String, Object> map) {
//        if(map.size() < 0) {
//            return;
//        }
//        List<Map<String, Object>> childrenMapList = (List<Map<String, Object>>) map.get("children");
//        if(childrenMapList != null && childrenMapList.size() > 0) {
//            for (Map<String, Object> cmap : childrenMapList) {
//                printTaxonomyName(cmap);
//            }
//        }
//        else {
//            list.add((String) map.get("taxonomyName"));
//        }
//
//    }
//
//    public static String readFileByReader(String filePath) throws IOException {
//        File file = new File(filePath);//定义一个file对象，用来初始化FileReader
//        FileReader reader = new FileReader(file);//定义一个fileReader对象，用来初始化BufferedReader
//        BufferedReader bReader = new BufferedReader(reader);//new一个BufferedReader对象，将文件内容读取到缓存
//        StringBuilder sb = new StringBuilder();//定义一个字符串缓存，将字符串存放缓存中
//        String s = "";
//        while ((s =bReader.readLine()) != null) {//逐行读取文件内容，不读取换行符和末尾的空格
//            sb.append(s + "\n");//将读取的字符串添加换行符后累加存放在缓存中
//        }
//        bReader.close();
//        return sb.toString();
//    }
//
//    public static String readFileByStream(String filePath) throws IOException {
//        File file = new File(filePath);
//        if(!file.exists()){
//            return null;
//        }
//        FileInputStream inputStream = new FileInputStream(file);
//        int length = inputStream.available();
//        byte bytes[] = new byte[length];
//        inputStream.read(bytes);
//        inputStream.close();
//        String str =new String(bytes, StandardCharsets.UTF_8);
//        return str ;
//    }
//}
